public class third extends qiujie{
    public static void main(String[] args) {
        third yuan = new third();
        yuan.r=4;
        System.out.println(yuan.zhouchang(yuan, 4, 0, 0, 0);
    }
}
class qiujie implements mian{
    double r=0,x=0,y=0,h=0;
    double m =0;
    public void setR(double r) {
        this.r = r;
    }
    String s=new String();
    public double mianji(String s,double r,double x ,double y,double h){
        if(s.equals("zhixian")){
            return m;
        }
        if(s.equals("jvxing")){
            return x*y;
        }
        if(s.equals("yuan")){
            return 2*r*3.14;
        }
        return m;
        
    }
    public double zhouchang(String s,double r,double x ,double y,double h){
        if(s.equals("zhixian")){
            return m;
        }
        if(s.equals("sanjiaoxing")){
            return x+y+r;
        }
        if(s.equals("jvxing")){
            return x*2+y*2;
        }
        if(s.equals("yuan")){
            return 3.14*r*r;
        }
        return m;
    }
    
}
interface mian{
    double mianji();
    double zhouchang();
}